package com.bjsxt.usercenter.common.util;

import java.util.Random;

public class RegexUtil
{
	String allStr =ConstatFinalUtil.ALLSTR;
	/**
	 * 生成随机数
	 * @param length 长度
	 * @return 
	 */
	public String proccedStr(int length){
		StringBuffer sb = new StringBuffer();
		Random random = new Random();
		for(int i=0;i<length;i++){
			int randInt =random.nextInt(allStr.length());
			char ch =allStr.charAt(randInt);
			sb.append(ch);
		}
		
		return sb.toString();
	}
	
	/**
	 * 生成随机姓名
	 * @return 随机姓名
	 */
	public static String createName()
	{
		String aa="张王赵李钱孙周吴郑";
		String bb="投影机途经开发尽快回复你们内部分为加热通风的规定";
		Random rand = new Random();
		int b =rand.nextInt(aa.length());
		int c= rand.nextInt(bb.length());
		char ch = aa.charAt(b);
		char ch1=bb.charAt(c);
		return ch+""+ch1+"";
	}
}
